package com.topisv.tms.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import com.topisv.tms.entity.PipeStock;
import com.topisv.tms.entity.PipeStockDetail;
import com.topisv.tms.entity.StoragePartition;
import com.topisv.tms.entity.StoragePipe;

public interface PipeStockDetailDao extends PagingAndSortingRepository<PipeStockDetail, Long>, JpaSpecificationExecutor<PipeStockDetail>{
	/*@Modifying
	@Query("select st from Storage st where st.areaGroup.id = ?1")
	List<Storage> getByAreaGroupId(Long id);
	
	@Query("select st from Storage st where st.areaGroup.id = ?1 and st.type=?2")
	List<Storage> findByAreaGroup(Long areaGroupId,String type);*/
	
	@Query("select st from PipeStockDetail st where st.stock_code = ?1")
	List<PipeStockDetail> findByStockCode(String stock_code);
}
